package sc.prototype.pfs.eventnotify.model;

import java.util.HashMap;

import sc.prototype.pfs.eventnotify.model.enums.EventType;

public abstract class NotifyEvent {

    /** 事件类型 */
    public abstract EventType getEventType();

    /** 事件键值，用于查询，不一定要唯一 */
    public abstract String getEventKey();

    /** 通知扩展参数，随通知保留 */
    protected HashMap<String, String> extensions;

    public HashMap<String, String> getExtensions() {
        if (extensions == null) {
            extensions = new HashMap<String, String>();
        }
        return extensions;
    }

    public void setExtensions(HashMap<String, String> extensions) {
        this.extensions = extensions;
    }

}
